import request from '@/util/request'

export function checkLogin(data) {
  return request({
    url: '/auth/token/check',
    method: 'post',
    data
  })
}

export function logout(data) {
  return request({
    url: '/auth/token/delete',
    method: 'post',
    data
  })
}

export function getUserWithoutToken(data) {
  return request({
    url: '/auth/user/getWithoutToken',
    method: 'post',
    data
  })
}

export function resetPassword(data) {
  return request({
    url: '/auth/user/resetPassword',
    method: 'post',
    data
  })
}

export function getInfo(data) {
  return request({
    url: '/auth/user/get',
    method: 'post',
    data
  })
}

export function getUserSecret() {
  return request({
    url: '/auth/user/secret',
    method: 'post'
  })
}

export function getAllUser(data) {
  return request({
    url: '/auth/user/list',
    method: 'post',
    data
  })
}

export function updateUser(data) {
  return request({
    url: '/auth/user/update',
    method: 'post',
    data
  })
}


export function updateUserName(data) {
  return request({
    url: '/auth/user/updateUserName',
    method: 'post',
    data
  })
}

export function updateUserPassword(data) {
  return request({
    url: '/auth/user/updatePassword',
    method: 'post',
    data
  })
}

export function pageGetUser(data) {
  return request({
    url: '/auth/user/pageGet',
    method: 'post',
    data
  })
}

export function registerUser(data) {
  return request({
    url: '/auth/user/register',
    method: 'post',
    data
  })
}

export function listUser(data) {
  return request({
    url: '/auth/user/list',
    method: 'post',
    data
  })
}

export function getSafeAuthCode(data) {
  return request({
    url: '/auth/user/getSafeAuthCode',
    method: 'post',
    data
  })
}

export function sendAuthCode(data) {
  return request({
    url: '/auth/user/sendAuthCode',
    method: 'post',
    data
  })
}

